Optimal. Leaf size=157 \[ -\frac {a \left (d^2-e^2 x^2\right )}{3 d^2 x^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (3 b d^2+2 a e^2\right ) \left (d^2-e^2 x^2\right )}{3 d^4 x \sqrt {d-e x} \sqrt {d+e x}}+\frac {c \sqrt {d^2-e^2 x^2} \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{e \sqrt {d-e x} \sqrt {d+e x}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {534, 1279, 462,
223, 209} \begin {gather*} -\frac {\left (d^2-e^2 x^2\right ) \left (2 a e^2+3 b d^2\right )}{3 d^4 x \sqrt {d-e x} \sqrt {d+e x}}-\frac {a \left (d^2-e^2 x^2\right )}{3 d^2 x^3 \sqrt {d-e x} \sqrt {d+e x}}+\frac {c \sqrt {d^2-e^2 x^2} \text {ArcTan}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{e \sqrt {d-e x} \sqrt {d+e x}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 223
Rule 462
Rule 534
Rule 1279
Rubi steps
\begin {align*} \int \frac {a+b x^2+c x^4}{x^4 \sqrt {d-e x} \sqrt {d+e x}} \, dx &=\frac {\sqrt {d^2-e^2 x^2} \int \frac {a+b x^2+c x^4}{x^4 \sqrt {d^2-e^2 x^2}} \, dx}{\sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {a \left (d^2-e^2 x^2\right )}{3 d^2 x^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\sqrt {d^2-e^2 x^2} \int \frac {-3 b d^2-2 a e^2-3 c d^2 x^2}{x^2 \sqrt {d^2-e^2 x^2}} \, dx}{3 d^2 \sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {a \left (d^2-e^2 x^2\right )}{3 d^2 x^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (3 b d^2+2 a e^2\right ) \left (d^2-e^2 x^2\right )}{3 d^4 x \sqrt {d-e x} \sqrt {d+e x}}+\frac {\left (c \sqrt {d^2-e^2 x^2}\right ) \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx}{\sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {a \left (d^2-e^2 x^2\right )}{3 d^2 x^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (3 b d^2+2 a e^2\right ) \left (d^2-e^2 x^2\right )}{3 d^4 x \sqrt {d-e x} \sqrt {d+e x}}+\frac {\left (c \sqrt {d^2-e^2 x^2}\right ) \text {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )}{\sqrt {d-e x} \sqrt {d+e x}}\\ &=-\frac {a \left (d^2-e^2 x^2\right )}{3 d^2 x^3 \sqrt {d-e x} \sqrt {d+e x}}-\frac {\left (3 b d^2+2 a e^2\right ) \left (d^2-e^2 x^2\right )}{3 d^4 x \sqrt {d-e x} \sqrt {d+e x}}+\frac {c \sqrt {d^2-e^2 x^2} \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{e \sqrt {d-e x} \sqrt {d+e x}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 81, normalized size = 0.52 \begin {gather*} -\frac {\sqrt {d-e x} \sqrt {d+e x} \left (3 b d^2 x^2+a \left (d^2+2 e^2 x^2\right )\right )}{3 d^4 x^3}+\frac {2 c \tan ^{-1}\left (\frac {\sqrt {d+e x}}{\sqrt {d-e x}}\right )}{e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.15, size = 146, normalized size = 0.93
method | result | size |
risch | \(-\frac {\sqrt {e x +d}\, \sqrt {-e x +d}\, \left (2 a \,e^{2} x^{2}+3 b \,d^{2} x^{2}+a \,d^{2}\right )}{3 d^{4} x^{3}}+\frac {c \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right ) \sqrt {\left (e x +d \right ) \left (-e x +d \right )}}{\sqrt {e^{2}}\, \sqrt {e x +d}\, \sqrt {-e x +d}}\) | \(107\) |
default | \(-\frac {\sqrt {-e x +d}\, \sqrt {e x +d}\, \left (-3 \arctan \left (\frac {\mathrm {csgn}\left (e \right ) e x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right ) c \,d^{4} x^{3}+2 \sqrt {-e^{2} x^{2}+d^{2}}\, \mathrm {csgn}\left (e \right ) e^{3} a \,x^{2}+3 \sqrt {-e^{2} x^{2}+d^{2}}\, \mathrm {csgn}\left (e \right ) e b \,d^{2} x^{2}+a \sqrt {-e^{2} x^{2}+d^{2}}\, d^{2} \mathrm {csgn}\left (e \right ) e \right ) \mathrm {csgn}\left (e \right )}{3 d^{4} \sqrt {-e^{2} x^{2}+d^{2}}\, e \,x^{3}}\) | \(146\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 81, normalized size = 0.52 \begin {gather*} c \arcsin \left (\frac {x e}{d}\right ) e^{\left (-1\right )} - \frac {\sqrt {-x^{2} e^{2} + d^{2}} b}{d^{2} x} - \frac {2 \, \sqrt {-x^{2} e^{2} + d^{2}} a e^{2}}{3 \, d^{4} x} - \frac {\sqrt {-x^{2} e^{2} + d^{2}} a}{3 \, d^{2} x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 90, normalized size = 0.57 \begin {gather*} -\frac {6 \, c d^{4} x^{3} \arctan \left (\frac {\sqrt {e x + d} \sqrt {-e x + d} - d}{e x}\right ) + {\left (a d^{2} e + {\left (3 \, b d^{2} e + 2 \, a e^{3}\right )} x^{2}\right )} \sqrt {e x + d} \sqrt {-e x + d}}{3 \, d^{4} e x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 55.95, size = 257, normalized size = 1.64 \begin {gather*} \frac {i a e^{3} {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {9}{4}, \frac {11}{4}, 1 & \frac {5}{2}, \frac {5}{2}, 3 \\2, \frac {9}{4}, \frac {5}{2}, \frac {11}{4}, 3 & 0 \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d^{4}} + \frac {a e^{3} {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {3}{2}, \frac {7}{4}, 2, \frac {9}{4}, \frac {5}{2}, 1 & \\\frac {7}{4}, \frac {9}{4} & \frac {3}{2}, 2, 2, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d^{4}} + \frac {i b e {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d^{2}} + \frac {b e {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} d^{2}} - \frac {i c {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {d^{2}}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e} + \frac {c {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {d^{2} e^{- 2 i \pi }}{e^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 555 vs.
\(2 (140) = 280\).
time = 3.48, size = 555, normalized size = 3.54 \begin {gather*} \frac {1}{3} \, {\left (3 \, {\left (\pi + 2 \, \arctan \left (\frac {\sqrt {x e + d} {\left (\frac {{\left (\sqrt {2} \sqrt {d} - \sqrt {-x e + d}\right )}^{2}}{x e + d} - 1\right )}}{2 \, {\left (\sqrt {2} \sqrt {d} - \sqrt {-x e + d}\right )}}\right )\right )} c - \frac {4 \, {\left (3 \, b d^{2} {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}{\sqrt {x e + d}} - \frac {\sqrt {x e + d}}{\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}\right )}^{5} e^{2} + 3 \, a {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}{\sqrt {x e + d}} - \frac {\sqrt {x e + d}}{\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}\right )}^{5} e^{4} - 24 \, b d^{2} {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}{\sqrt {x e + d}} - \frac {\sqrt {x e + d}}{\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}\right )}^{3} e^{2} - 8 \, a {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}{\sqrt {x e + d}} - \frac {\sqrt {x e + d}}{\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}\right )}^{3} e^{4} + 48 \, b d^{2} {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}{\sqrt {x e + d}} - \frac {\sqrt {x e + d}}{\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}\right )} e^{2} + 48 \, a {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}{\sqrt {x e + d}} - \frac {\sqrt {x e + d}}{\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}\right )} e^{4}\right )}}{{\left ({\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}{\sqrt {x e + d}} - \frac {\sqrt {x e + d}}{\sqrt {2} \sqrt {d} - \sqrt {-x e + d}}\right )}^{2} - 4\right )}^{3} d^{4}}\right )} e^{\left (-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.27, size = 138, normalized size = 0.88 \begin {gather*} -\frac {4\,c\,\mathrm {atan}\left (\frac {e\,\left (\sqrt {d-e\,x}-\sqrt {d}\right )}{\sqrt {e^2}\,\left (\sqrt {d+e\,x}-\sqrt {d}\right )}\right )}{\sqrt {e^2}}-\frac {\left (\frac {b}{d}+\frac {b\,e\,x}{d^2}\right )\,\sqrt {d-e\,x}}{x\,\sqrt {d+e\,x}}-\frac {\sqrt {d-e\,x}\,\left (\frac {a}{3\,d}+\frac {2\,a\,e^2\,x^2}{3\,d^3}+\frac {2\,a\,e^3\,x^3}{3\,d^4}+\frac {a\,e\,x}{3\,d^2}\right )}{x^3\,\sqrt {d+e\,x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________